import { moduleForModel, test } from 'ember-qunit';

moduleForModel('shuser', 'Unit | Serializer | application', {
  // Specify the other units that are required for this test.
  needs: ['serializer:application','model:role']
});

// Replace this with your real tests.
test('it serializes records', function(assert) {
  var store = this.store();

  Ember.run(function(){
    store.push("shuser", {id: 2, email: "email2"});

    var u = store.peekRecord("shuser", 2);
    var us = u.serialize();
    console.log(us);
    assert.ok(us.id);

    store.push("role", {id: 1, name: "rn"});

    var r = store.peekRecord("role", 1);
    var rs = r.serialize();
    console.log(rs);
    assert.ok(rs.id, "role should has id.");
  });
});
